package sma.iss.sort;

import java.util.Comparator;

import sma.iss.Position;

/**
 * To sort Position according score
 * 
 * @author smarsoll
 * 
 */
public class ScoreCumulComparator implements Comparator<Position> {

	public int compare(Position pos1, Position pos2) {
		double cumulatedScore = pos1.getCumulatedScore();
		double cumulatedScore2 = pos2.getCumulatedScore();
		if (cumulatedScore < cumulatedScore2) {
			return +1;
		} else if (cumulatedScore > cumulatedScore2) {
			return -1;
		}
		return 0;
	}

}
